Skip to content

feat(id): transport advertisement minter + .well-known serving (#8214 slice 4) - #11007

Merged
dezren39 merged 1 commit into
mainfrom
queue/20089-8214-wellknown-minter
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/20089-8214-wellknown-minter

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Slice 4 of #8214 (task 20089, lane any-f): the server side of signed transport advertisements. Slices 1+2 (PR #10951, PR #10952) landed the type/sign/verify/selection, the durable sequence counter, and the LKG cache + substrate resolution. This slice adds minting and serving:

id-core — AdMinter (transport_advertisement.rs)

  • Owns the subject identity key + the SequenceFile beside it; produces the one current signed ad (Decision 1).
  • mint (unconditional, sequence + 1), refresh (Decision 3: mint only on transport change, first mint, or expiry — a no-op refresh consumes no sequence), current_bytes (re-mints an expired ad in place over its last transport set, so a server that is asked always answers fresh).
  • Served bytes are captured at mint time (serde JSON of SignedAdvertisement), so every substrate serves the identical object byte-for-byte (Decision 2 parity). TTL clamped to the record's 24h max; RECOMMENDED_TTL_SECONDS = 1h per the record.

id-web — .well-known handler (new transport_ad.rs)

  • GET /.well-known/id-transport-advertisement?subject=<fp> serves the minter's current bytes verbatim (Decision 2.2, the authoritative self-hosted substrate). Subject mismatch → 404 (this server publishes exactly one ad); no minter wired → 404; it never re-encodes or invents an ad.
  • AppState.transport_ad: Option<Arc<AdMinter>> + setter, plumbed through web_routers_with_surface exactly like transfer_endpoint.

id-cli — id serve wiring

  • Builds the minter from the node keypair, SequenceFile at .transport-ad-sequence beside the identity key (KEY_FILE), first mint over the endpoint's current transports (direct UDP addrs priority 10, home relay priority 20 — the id: design: ID transport fallback for UDP-denied networks v1 #5671 fallback order).
  • A 30s watcher re-mints when the endpoint's address set changes (Decision 3 transport-change minting).

Tests (oracle: the #5793 record)

  • id-core minter (5 new): minted ad verifies + served bytes stable; refresh mints only on change/expiry; current_bytes re-mints an expired ad; sequence never regresses across minter restarts (invariant 8); TTL clamped to 24h.
  • id-web handler (2 new): serves the current ad byte-for-byte and the served object verifies; subject mismatch and missing minter are 404.
  • Full suites: id-core 470 passed, id-web 698 passed, id-cli 686 passed; cargo fmt clean.

Remaining for #8214: slice 3 — fetch-side HTTPS substrates (well-known fetch, Workers rendezvous fetch by H(subject), DNS TXT bootstrap hints, background revalidation) plus the HTTP-stack decision recorded on the issue by lane any-c. The issue stays open for that slice.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 06:03
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T06:03:33.482237Z
We couldn’t complete this review. Comment @codex review to try again.
f82f667 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd659554-94b1-4695-9b96-54a4d858064b
Commits

Reviewing files that changed from the base of the PR and between 82aa1ea and f82f667.

Files selected for processing: 5

  • pkgs/id/crates/id-cli/src/commands/serve.rs
  • pkgs/id/crates/id-core/src/transport_advertisement.rs
  • pkgs/id/crates/id-web/src/lib.rs
  • pkgs/id/crates/id-web/src/routes.rs
  • pkgs/id/crates/id-web/src/transport_ad.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

Agent note — Codex disposition (lane any-f, task 20089)

Codex review did not run on PR #11007: the connector posted its usage-limits message and there are zero review comments and zero inline findings to disposition — the gate is recorded here rather than silently passed. Verification stands on the local suites in the PR body (id-core 470, id-web 698, id-cli 686, all passing; the new minter and handler tests name the #5793 record as their oracle).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant